﻿using BCEntity.OA.AuxiliaryRule;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace BCData.OA.AuxiliaryRule
{
    /// <summary>
    /// OA系统辅助规则
    /// </summary>
	public interface IAuxiliaryRuleData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="auxiliaryRuleId">OA系统辅助规则Id</param>
        Task<bool> Exists(long auxiliaryRuleId);
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="auxiliaryRuleName">OA系统辅助规则名称</param>
        Task<bool> Exists(string auxiliaryRuleName);

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="auxiliaryRuleId">OA系统辅助规则Id</param>
        Task<bool> ExistsByPageBusinessConfigId(long pageBusinessMappingDepartmentId);
        /// <summary>
        /// 增加OA系统辅助规则
        /// </summary>
        /// <param name="entity">OA系统辅助规则信息</param>
        Task<AuxiliaryRuleEntity> Add(AuxiliaryRuleEntity entity);
        /// <summary>
        /// 更新OA系统辅助规则
        /// </summary>
        /// <param name="entity">OA系统辅助规则信息</param>
        Task<AuxiliaryRuleEntity> Update(AuxiliaryRuleEntity entity);
        /// <summary>
        /// 删除OA系统辅助规则
        /// </summary>
        /// <param name="auxiliaryRuleId">OA系统辅助规则Id</param>
        Task<bool> Delete(long auxiliaryRuleId);
        /// <summary>
        /// 获取OA系统辅助规则
        /// </summary>
        /// <param name="auxiliaryRuleId">OA系统辅助规则Id</param>
        Task<AuxiliaryRuleEntity> GetEntity(long auxiliaryRuleId);
        /// <summary>
        /// 获取OA系统辅助规则
        /// </summary>
        /// <param name="pageBusinessMappingDepartmentId">页面业务映射部门Id</param>
        /// <returns></returns>
        Task<AuxiliaryRuleEntity> GetEntityByPageBusinessConfigId(long pageBusinessMappingDepartmentId);
        /// <summary>
        /// 获取OA系统辅助规则列表
        /// </summary>
        Task<IEnumerable<AuxiliaryRuleEntity>> GetList();
        /// <summary>
        /// 获取OA系统辅助规则分页列表
        /// </summary>
        /// <param name="auxiliaryRuleName">OA系统辅助规则名称</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">OA系统辅助规则每页数据条数</param>
        Task<(IEnumerable<AuxiliaryRuleEntity>, int)> Query(string auxiliaryRuleName, DateTime? start, DateTime? end, int pageIndex, int pageSize);
        #endregion  成员方法
    }
}
